﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using EHTWebsite.Code;

namespace EHTWebsiteProject.Code.BLL
{
    public class NgonNguProvider
    {
        public static DataSet GetNgonNgu(Int32 Loai, Boolean IsSelect)
        {
            SqlCommand command = new SqlCommand();
            command.CommandText = "proc_GetAllNgonNgu";
            command.CommandType = CommandType.StoredProcedure;

            command.Parameters.Add(new SqlParameter("@Loai", Loai));
            command.Parameters.Add(new SqlParameter("@IsSelect", IsSelect));

            return DataProvider.ExecuteDataSet(command);
        }
        public static void ChangeNgonNgu(Int32 ngonnguID , Int32 Loai)
        {
            SqlCommand command = new SqlCommand();
            command.CommandText = "proc_ChangeNgonNgu";
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add(new SqlParameter("@NgonNguID", ngonnguID));
            command.Parameters.Add(new SqlParameter("@Loai", Loai));

            DataProvider.ExecuteNoneQuery(command);
        }
    }
}